package com.google.code.tutorials.java.spring.data.jpa.repository.custom;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.google.code.tutorials.java.spring.data.jpa.domain.Person;

public interface PersonRepository extends CrudRepository<Person, Long>, CustomRepository {
	@Query("select p from Person p where p.firstname = ?1")
	List<Person> findByFirstname(String firstname);
	
	@Query("select p from Person p where p.username = ?1")
	Person findByTheUsersName(String username);
}
